package cn.steam.foo.ctrl;

import cn.steam.bar.model.WeaponVO;
import cn.steam.foo.model.TaskResult;
import cn.steam.foo.service.WeaponService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.*;

/**
 * @author zhang jintao on 2022/05/15
 **/
@RestController
@RequestMapping("weapon")
public class WeaponCtrl {

    @Autowired
    private WeaponService weaponService;


    @GetMapping("id")
    public WeaponVO id(@RequestParam("id") Integer id) {
        return weaponService.getById(id);
    }

    @PostMapping("addBatch")
    public String addBatch(@RequestParam("num") Integer num) {
        return weaponService.addBatch(num);
    }


    @GetMapping("look")
    public TaskResult look(@RequestParam("taskId") String taskId) {
        return weaponService.look(taskId);
    }
}
